<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
</head>
<body>
Hello Spring Boot Thymeleaf ! Your session id is:
<p th:text="${#httpServletRequest.getSession().getId()}"
   th:unless="${#httpServletRequest.getSession().getId()==null}">none</p>

contextPath:
<p th:text="${#httpServletRequest.getContextPath()}">none</p>
</body>
</html>